home *** CD-ROM | disk | FTP | other *** search
- -- background: 2888 from stack: in
- -- bmap block id: 17284
- -- flags: 0000
- -- background id: 0
- -- name: Stock Background
-
-
- -- part 1 (field)
- -- low flags: 00
- -- high flags: 0001
- -- rect: left=32 top=34 right=50 bottom=488
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 3
- -- text size: 12
- -- style flags: 256
- -- line height: 16
- -- part name: Name
-
-
- -- part 2 (field)
- -- low flags: 00
- -- high flags: 0007
- -- rect: left=82 top=96 right=302 bottom=168
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 3
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Date
-
-
- -- part 3 (field)
- -- low flags: 00
- -- high flags: 0007
- -- rect: left=241 top=96 right=302 bottom=313
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 3
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Price
-
-
- -- part 4 (field)
- -- low flags: 00
- -- high flags: 0007
- -- rect: left=319 top=96 right=302 bottom=391
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 3
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Volume
-
-
- -- part 6 (button)
- -- low flags: 00
- -- high flags: 8003
- -- rect: left=397 top=262 right=284 bottom=481
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Menu
- ----- HyperTalk script -----
- on mouseUp
- go card id 4680
- end mouseUp
-
-
-
- -- part 7 (button)
- -- low flags: 00
- -- high flags: 8003
- -- rect: left=397 top=226 right=248 bottom=481
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Update
- ----- HyperTalk script -----
- on mouseUp
- put empty into field "DCV"
- get the number of lines in field "Date"
- put it into NumLines
- get line 1 of field "Price"
- put it into x
- get line 1 of field "Volume"
- put it into y
- put y into line 1 of field "DCV"
- repeat with temp = 2 to NumLines
- get line temp of field "Price"
- put it into NextX
- get line temp of field "Volume"
- put it into y
- if NextX > X then
- put (line (temp-1) of field "DCV" + y) into line temp of field "DCV"
- else
- if NextX < X then
- put (line (temp-1) of field "DCV"-y) into line temp of field "DCV"
- else
- if NextX=X then
- put line(temp-1) of field "DCV" into line temp of field "DCV"
- end if
- end if
- end if
- put NextX into X
- end repeat
-
- end mouseUp
-
-
-
- -- part 9 (button)
- -- low flags: 80
- -- high flags: 8003
- -- rect: left=92 top=320 right=342 bottom=192
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Print Graph
- ----- HyperTalk script -----
- on mouseUp
- domenu "Print Card"
- end mouseUp
-
-
-
- -- part 12 (button)
- -- low flags: 00
- -- high flags: 8003
- -- rect: left=398 top=300 right=320 bottom=480
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Chart
- ----- HyperTalk script -----
- on mouseUp
- clearScreen
- choose rect tool
- set lineSize to 1
- set filled to true
- set pattern to 1
- drag from 28,29 to 491,319
-
- --**get number of entries and entry width**--
- put number of lines in field "DCV" into numEntries
- put (430/numEntries) into entryWidth
- put (430/numEntries)-10 into entryWidth1
-
- --**find scale for bars**--
- put line 1 of field "DCV" into maxData
- repeat with x = 2 to numEntries
- put max(maxData, line x of field "DCV") into maxData
- end repeat
- set textFont to geneva
- set textSize to 9
- set textAlign to center
- choose text tool
- put 50 into x
- put 1 into y
- repeat for 5 times
- click at 35, x
- type (y*maxData)
- put x + 60 into x
- put y - .25 into y
- end repeat
- click at 35, 300
- type "DCV Scale"
-
- --** plot chart for DCV **--
- choose rect tool
- set pattern to 13
-
- repeat with x = 0 to (numEntries-1)
- put trunc (40 + (x * entrywidth)) into start
- drag from start, trunc(290 - ((line (x+1) of field "DCV") / maxData) *240) to trunc(start + entryWidth1), 290
- end repeat
-
- --** find scale for lines **--
- put line 1 of field "Price" into maxData
- repeat with x = 2 to numEntries
- put max(maxData, line x of field "Price") into maxData
- end repeat
- choose text tool
- put 50 into x
- put 1 into y
- repeat for 5 times
- click at 480, x
- type (y*maxData)
- put x + 60 into x
- put y - .25 into y
- end repeat
- click at 480, 300
- type "Price Scale"
- click at 255,305
- type "Bar = DCV Line = Price"
-
- --** plot chart for Price **--
- set lineSize to 2
- choose line tool
- drag from 40, 290 to trunc(40+(1/2*entryWidth)), trunc(290-((line 1 of field "Price"/maxData)*240))
- put trunc(40+(1/2*entryWidth)) into oldX
- put trunc(290-((line 1 of field "Price"/maxData)*240)) into oldY
- repeat with x = 2 to numEntries
- put trunc(oldX+entryWidth) into newX
- put trunc(290-((line x of field "Price"/maxData)*240)) into newY
- drag from oldX, oldY to newX, newY
- put newX into oldX
- put newY into oldY
- end repeat
-
- show bkgnd button "Print Graph"
- show bkgnd button "Clear Graph"
- choose browse tool
- end mouseUp
-
- on clearScreen
- choose select tool
- drag from 29, 40 to 476, 302
- domenu "Clear Picture"
- end clearScreen
-
-
-
-
- -- part 5 (field)
- -- low flags: 80
- -- high flags: 0007
- -- rect: left=396 top=96 right=322 bottom=468
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 3
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: DCV
-
-
- -- part 13 (button)
- -- low flags: 80
- -- high flags: 8003
- -- rect: left=307 top=320 right=342 bottom=407
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Clear Graph
- ----- HyperTalk script -----
- on mouseUp
- choose select tool
- drag from 4,26 to 507,327
- domenu "Clear Picture"
- hide bkgnd button "Print Graph"
- hide bkgnd button "Clear Graph"
- choose browse tool
- end mouseUp
-
-
-